package com.gold.common;

import java.util.*;

/**
 * 全局缓存类
 *
 * @author XiaoHao
 * @date 2022-05-09 17:17
 */
public class CacheUtils {
    private static HashMap<String, String> map = new HashMap<>();
    private static Set<String> list = new HashSet<>();

    public static void set(String key, String value) {
        map.put(key, value);
    }

    public static void del(String key) {
        map.remove(key);
    }

    public static String get(String key) {
        return map.get(key);
    }

    public static void setList(String str) {
        list.add(str);
    }

    public static boolean compareList(String str) {
        return list.contains(str);
    }

    public static void removeList(String str) {
        list.remove(str);
    }


}
